package com.example.tsbs.util;

import com.sun.jna.Library;
import com.sun.jna.Memory;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.ptr.FloatByReference;
import com.sun.jna.ptr.IntByReference;
import com.sun.jna.ptr.PointerByReference;
import lombok.extern.slf4j.Slf4j;

/**
 * 接口继承
 */
public interface MyClibrary extends Library {
    MyClibrary INSTANTCE = Native.load("/root/danjidi/light/libLIGHT_TARGET.so", MyClibrary.class);
//    MyClibrary INSTANTCE = Native.load("/root/danjidi/light/libtest.so", MyClibrary.class);
    MyClibrary pinINSTANTCE = Native.load("/root/danjidi/libTS_TARGET.so", MyClibrary.class);

    MyClibrary mINSTANTCE = Native.load("/root/danjidi/test/libmid.so", MyClibrary.class);
    MyClibrary cINSTANTCE = Native.load("/root/danjidi/libhello.so", MyClibrary.class);
    int hello();

    int main();

    //char *TargetFileName,char *BoundaryFileName[100],float** XData,float** YData,float** ZData
    int _Z23LIGHT_target_free_lightPcPS_fffffffffffffPiPPfS3_S3_S3_(String TargetFileName, String[] BoundaryFileName,
                                float SourceX0, float SourceY0, float SourceZ0,
                                float SourceRX0, float SourceRY0, float SourceRZ0,
                                float frec_low, float frec_step, float frec_high,
                                float LaunchCenterFrec, float LaunchPulseWidth,
                                float ReceiveSigWidth, float FrecSample,
                                IntByReference count_lights, PointerByReference XData,
                                PointerByReference YData, PointerByReference ZData, PointerByReference WData);

    int LIGHT_target_free_light(String TargetFileName, String[] BoundaryFileName,
                                float SourceX0, float SourceY0, float SourceZ0,
                                float SourceRX0, float SourceRY0, float SourceRZ0,
                                float frec_low, float frec_step, float frec_high,
                                float LaunchCenterFrec, float LaunchPulseWidth,
                                float ReceiveSigWidth, float FrecSample,
                                IntByReference count_lights, PointerByReference XData,
                                PointerByReference YData, PointerByReference ZData, PointerByReference WData);

    int LIGHT_target_free_light(String TargetFileName, String[] BoundaryFileName,
                                float SourceX0, float SourceY0, float SourceZ0,
                                float SourceRX0, float SourceRY0, float SourceRZ0,
                                float frec_low, float frec_step, float frec_high,
                                float LaunchCenterFrec, float LaunchPulseWidth,
                                float ReceiveSigWidth, float FrecSample,
                                Pointer count_lights, Pointer XData, Pointer YData, Pointer ZData, Pointer WData);



    int  TS_xuyuan_target_free_frec(String TargetFileName, String[] BoundaryFileName,
                                   double interface_sea_depth, double interface_distance,
                                   float SourceX0, float SourceY0, float SourceZ0,
                                   float SourceRX0, float SourceRY0, float SourceRZ0,
                                   float frec_low, float frec_step, float frec_high,
                                   PointerByReference  XData, PointerByReference  YData, PointerByReference  ZData);

    int  TS_xuyuan_target_free_frec(String TargetFileName, String[] BoundaryFileName,
                                    double interface_sea_depth, double interface_distance,
                                    float SourceX0, float SourceY0, float SourceZ0,
                                    float SourceRX0, float SourceRY0, float SourceRZ0,
                                    float frec_low, float frec_step, float frec_high,
                                    Pointer XData, Pointer YData, Pointer ZData);


    int TS_target_free_frec(String TargetFileName, String[] BoundaryFileName,
                            float SourceX0, float SourceY0, float SourceZ0,
                            float SourceRX0, float SourceRY0, float SourceRZ0,
                            float frec_low, float frec_step, float frec_high,
                            Memory XData, Memory YData, Memory ZData);

    int TS_target_free_frec(String TargetFileName, String[] BoundaryFileName,
                            float SourceX0, float SourceY0, float SourceZ0,
                            float SourceRX0, float SourceRY0, float SourceRZ0,
                            float frec_low, float frec_step, float frec_high,
                            FloatByReference XData, FloatByReference YData, FloatByReference ZData);

    int TS_target_free_frec(String TargetFileName, String BoundaryFileName[],
                            float SourceX0, float SourceY0, float SourceZ0,
                            float SourceRX0, float SourceRY0, float SourceRZ0,
                            float frec_low, float frec_step, float frec_high,
                            PointerByReference XData, PointerByReference YData, PointerByReference ZData);

    int TS_target_free_frec(String TargetFileName, String[] BoundaryFileName,
                            float SourceX0, float SourceY0, float SourceZ0,
                            float SourceRX0, float SourceRY0, float SourceRZ0,
                            float frec_low, float frec_step, float frec_high,
                            float[] XData, float[] YData, float[] ZData);



    int sayCplus(PointerByReference x);
    int sayCplus(Pointer x);



    int TS_target_free_frec(byte[] ddt, String[] files, double v, double v1, double v2, double v3, double v4, double v5,
                            double v6, double v7, double v8, FloatByReference xData, FloatByReference yData, FloatByReference zData);

    int TS_target_free_frec(byte[] ddt, String[] files, double v, double v1, double v2, double v3, double v4, double v5, double v6, double v7, double v8, PointerByReference xData, PointerByReference yData, PointerByReference zData);
}
